<?php
namespace app\models;

use laiq\base\Model;

class UserModel extends Model
{
    protected $table = 'user';

    public function getByNamePass($name, $pass)
    {
        if (!$name || !$pass) {
            throw new Exception('Miss Param');
        }
        $row = $this->get($this->table, '*', ['name' => $name, 'pwd'=>$pass]);
        return $row;
    }

    /**
     * 更新用户登录Token
     * @param $id
     */
    public function updateToken($id)
    {

    }
}